/*
 * @Author: zwz
 * @Date: 2023-05-28 16:35:22
 * @LastEditors: zwz
 * @LastEditTime: 2023-05-28 16:37:11
 * @Description: 进入保存session
 */

module.exports = () => {
  return async (ctx,next) => {
    await next()
    if (!ctx.session) return;
    ctx.session.save()
  }
}